<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/static/commons/taglibs.jsp"%>
<%@ include file="/static/commons/meta.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 	<title>${title }</title>
	<!--自定义index样式-->
	<link rel="stylesheet" href="${ctx }/static/styles/basic/basic.css"></link>
	<link rel="stylesheet" href="${ctx }/static/styles/edit/box.css"></link>
	<!--js库-->
	<%@ include file="/static/commons/jquery-easyui.jsp" %>
	<script type="text/javascript" src="${ctx}/static/widgets/easyui/plugins/jquery.draggable.js"></script>
	<script type="text/javascript" src="${ctx}/static/widgets/easyui/plugins/jquery.droppable.js"></script>
	<script type="text/javascript" src="${ctx}/static/widgets/easyui/plugins/jquery.tree.js"></script>
	<script type="text/javascript" src="${ctx}/static/scripts/set_select.js"></script>
	<script type="text/javascript" src="${ctx}/static/scripts/WdatePicker/WdatePicker.js"></script>
	<script type="text/javascript">
		var headers = {};
		headers['__RequestVerificationToken'] = "${RequestVerificationToken}";
	</script>
  </head>
  
  <body style="padding-bottom:8px;">
  		<c:set var="em" value="<span>*</span>"></c:set>
  		<c:set var="disabled" value=""></c:set>
  		<c:set var="ifSelect" value=""></c:set>
  		<c:set var="noChange" value=""></c:set>
  		<c:set var="isImportant" value="true"></c:set>
  		<c:if test="${not empty view}">
  			<c:set var="disabled" value="disabled"></c:set>
  			<c:set var="ifSelect" value="false"></c:set>
  			<c:set var="em" value=""></c:set>
  			<c:set var="isImportant" value=""></c:set>
  		</c:if>
  		<c:if test="${not empty role.user_id}">
	  		<c:set var="noChange" value="disabled"></c:set>
  		</c:if>
  		<form id="editForm" action="${ctx}/standardDevice/save" method="post">
  			<input type="hidden" value="${obj.device_id}" id="deviceId" name="p_deviceId" />
  			<div class="box">
	  			<table cellspacing="0" cellpadding="0">
	  				<tbody>
						<tr>
							<td class="message">
								<p><span>*</span>装置名称：</p>
							</td>
							<td colspan="1">
								<input type="text" id="deviceName" name="p_deviceName" value="${obj.device_name }"
									class="wd170 " ${disabled } maxLength="20" style="width: 100%;" />
							</td>
						</tr>
						<tr>
							<td class="message">
								<p><span>*</span>有效期：</p>
							</td>
							<td>
								<input type="text" id="endDate" name="p_endDate" value="${obj.end_date }"
									onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,readOnly:true})"  ${disabled } 
									class="wd170 Wdate" style="width: 100%;" />
							</td>
						</tr>
						<tr>
							<td class="message">
								<p><span>*</span>证书编号：</p>
							</td>
							<td>
								<input type="text" id="certCode" name="p_certCode" value="${obj.cert_code }"
									class="wd170 " ${disabled } maxLength="40" style="width: 100%;" />
							</td>
						</tr>
						<tr>
							<td class="message">
								<p><span>*</span>测量范围：</p>
							</td>
							<td>
								<input type="text" id="measureScope" name="p_measureScope" value="${obj.measure_scope }"
									class="wd170 " ${disabled } maxLength="50" style="width: 100%;" />
							</td>
						</tr>
						<tr>
							<td class="message">
								<p><span>*</span>不确定度/标准度等级/最大允许误差：</p>
							</td>
							<td>
								<input type="text" id="memo" name="p_memo" value="${obj.memo }"
									class="wd170 " ${disabled } maxLength="50" style="width: 100%;" />
							</td>
						</tr>
						<tr>
							<td class="message">
								<p><span>*</span>设备类型：</p>
							</td>
							<td>
  								<vvise:select id="deviceType" name="p_deviceType" sqlname="getCodeData" sqlparam="device_type" 
			            			className="wd170" width="99%" defval="${obj.device_type}" ifSelect="${ifSelect}"
			            			onchange="changeSelect('${ctx}/common/getSelectOptions?sqlname=getDeviceName&sqlparam='+this.value, 'deviceId_');"/>
							</td>
						</tr>
						<tr>
							<td class="message">
								<p>设备名称：</p>
							</td>
							<td>
  								<vvise:select id="deviceId_" name="p_deviceId_" sqlname="getDeviceName" sqlparam="${empty obj.device_type ? 4 : obj.device_type}" 
			            			className="wd170" width="99%" defval="${obj.device_id_}" ifSelect="${ifSelect}"/>
							</td>
						</tr>
						<tr>
							<td class="message">
								<p>排序：</p>
							</td>
							<td>
								<input type="text" id="orderNo" name="p_orderNo" value="${obj.order_no }"
									class="wd170 " ${disabled } maxLength="50" style="width: 100%;" />
							</td>
						</tr>
						<tr>
							<td class="message">
								<p>备注：</p>
							</td>
							<td>
								<input type="text" id="remark" name="p_remark" value="${obj.remark }"
									class="wd170 " ${disabled } maxLength="100" style="width: 100%;" />
							</td>
						</tr>
					</tbody>
	  			</table>
	  		</div>
        </form>
  </body>
</html>